package pages;

import org.openqa.selenium.By;
import utils.Log4Test;
import utils.WebDriverWrapper;

/**
 * Created by Vadim on 6/10/14.
 */
public class CarsPage extends BasePage {
    private static final String URL_CARS = "http://rozetka.com.ua/273290/c273290/";
    private static final By pageCars = By.xpath("//*[@id='273290']/div/a");

    public CarsPage(WebDriverWrapper driver) {
        super(driver, URL_CARS);
    }

    public void open() {
        driver.findElement(pageCars).click();
        if (driver.getCurrentUrl().equals(URL_CARS)) {
            Log4Test.info("Page cars is opened");
        } else {
            Log4Test.error("Page cars isn't opened");
        }
    }
}
